package cn.hackcloud.designpattern.mediator;

import java.util.HashMap;

public class ConcreateMediator extends Mediator {
	HashMap<String, Colleague> colleagues;
	HashMap<String, String> innerMap;

	public ConcreateMediator() {
		super();
		this.colleagues = new HashMap<String, Colleague>();
		innerMap = new HashMap<String, String>();
	}

	@Override
	void register(String name, Colleague colleague) {
		colleagues.put(name, colleague);
		if (colleague instanceof Alarm) {
			innerMap.put("Alarm", name);
		}
	}

	@Override
	public void getMessage(int stateChanged, String name) {
		if (colleagues.get(name) instanceof Alarm) {
			if (stateChanged == 0) {
				
			}
		}
	}

	@Override
	public void sendMessage() {
	}

}
